package com.plian.system.vo.sys;

import com.plian.system.entity.sys.Org;
import com.plian.system.node.INode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: Take-off
 * @Description: TODO
 * @Date: 2022/11/17 3:27 PM
 * @Version: 1.0
 **/
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(value = "组织VO")
public class OrgVO extends Org implements INode<String, OrgVO> {
    private static final long serialVersionUID = 1L;

    private String label;

    private String value;

    private String userOrgId;

    @ApiModelProperty(value = "父节点dataSourceId")
    private String parentDataSourceId;

    private List<OrgVO> children;

    private String orgName;

    @ApiModelProperty(value = "组织简称")
    private String orgCheckName;

    @Override
    public List<OrgVO> getChildren() {
        if (this.children == null) {
            this.children = new ArrayList<>();
        }
        return this.children;
    }
}
